package com.woniuxy.caradmin.service.impl;

import com.woniuxy.caradmin.entity.pojo.Oilrecord;
import com.woniuxy.caradmin.entity.vo.OilRecordVo;
import com.woniuxy.caradmin.mapper.OilrecordMapper;
import com.woniuxy.caradmin.service.OilrecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author womenzu
 * @since 2020-12-07
 */
@Service
public class OilrecordServiceImpl implements OilrecordService {

    @Autowired
    private OilrecordMapper oilrecordMapper;

    @Override
    public List<Oilrecord> selectAllOilRecords(OilRecordVo oilRecordVo) {
        return oilrecordMapper.selectAllOilRecords();
    }

    @Override
    public List<Oilrecord> selectAllOilRecordsByVid(String vehiclenum) {
        return oilrecordMapper.selectAllOilRecordsByVid(vehiclenum);
    }

    @Override
    public int addOilRecord(Oilrecord oilrecord) {
        return oilrecordMapper.addOilRecord(oilrecord);
    }

    @Override
    public int updateOilRecord(Oilrecord oilrecord) {
        return oilrecordMapper.updateOilRecord(oilrecord);
    }

    @Override
    public int deleteOilRecord(Integer id) {
        return oilrecordMapper.deleteOilRecord(id);
    }
}
